package com.zero.dubbo.sample.customer;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AnnotationConsumer {

    public static void main(String[] args){
        /**
         * 基于注解配置初始化spring上下文
         */
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
        context.start();

        EchoConsumer echoService = context.getBean(EchoConsumer.class);
        String hello = echoService.echo("Hello world");
        System.out.println("result: " + hello);
    }
}
